package com.woniuxy.yoga.commons.redis.util.rediskeyutil;

public class UserRedisKeyUtil {

    /**
     * 用户注册发送验证码key
     */
    public static String userRegisterCodeKey(String phone){
        return "user:register:code:phone:"+phone;
    }

    /**
     * 用户修改手机号发送验证码key
     */
    public static String userChangePhoneCodeKey(String phone){
        return "user:change:phone:code:phone:"+phone;
    }

    /**
     *一分钟内是否发送过用户注册短信
     */
    public static String userRegisterCodeOneMinute(String phone){
        return "user:register:code:minute:phone:"+phone;
    }

    /**
     *一分钟内是否发送过用户修改手机号短信
     */
    public static String userChangePhoneCodeOneMinute(String phone){
        return "user:change:phone:code:minute:phone:"+phone;
    }

    /**
     * 用户一小时发送短信总次数
     */
    public static String userSendNumbers(String phone){
        return "user:send:code:numbers:phone:"+phone;
    }

    /**
     * 注册用户名锁
     */
    public static String lockRegisterByUserName(String userName){
        return "lock:register:userName:"+userName;
    }

    /**
     * 用户注册手机号锁
     */
    public static String lockRegisterByUserPhone(String userPhone){
        return "lock:register:userPhone:"+userPhone;
    }

    /**
     * 用户登录验证码key
     */
    public static String userLoginCodeKey(String phone){
        return "user:login:code:phone:"+phone;
    }

    /**
     * 一分钟内是否发送过用户登录短信
     */
    public static String userLoginCodeOnMinute(String phone){
        return "user:login:code:minute:phone:"+phone;
    }

    /**
     * 用户的教练关注列表key
     */
    public static String followCoach(Integer userId){
        return "follow:coach:userId:"+userId;
    }

    /**
     * @return 教练关注排行榜KEY
     */
    public static String followCoachRank(){
        return "follow:coach:rank";
    }

    /**
     * 用户的场馆关注列表key
     */
    public static String followStore(Integer userId){
        return "follow:store:userId:"+userId;
    }

    /**
     * @return 场馆关注排行榜KEY
     */
    public static String followStoreRank(){
        return "follow:store:rank";
    }

}
